/**
 *******************************************************************************
 * @file adc_driver.h
 * @author .ISS_AUTO (hudandan@issauto.com)
 * @date    2025-05-09   1. 添加ADC1,ADC3配置使能宏定义。
 *                       2. 添加ADC1,ADC3低功耗配置。
 *
 * @brief This file is for the ADC DMA configuration.
 *
 * @copyright Copyright (c) 2025 ISSAUTO TECH Co., Ltd. All rights reserved.
 *
 *******************************************************************************
 */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __ADC_DRIVER_H
#define __ADC_DRIVER_H

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* Exported types ------------------------------------------------------------*/
typedef struct __ADC_DMA_DriverTypeDef {

    ADC_InitType ADC_InitParam;     /*!< ADC communication parameters */

    void (*IrqHandlerISR)(void *dadc); /*!< ADC function pointer on IrqHandler   */

    DMA_InitType DMA_InitParam;    /*!< ADC Rx DMA handle parameters */

    void (*DMA_RxCpltCallback)(void *dadc); /*!< ADC Rx Completed callback */

} ADC_DMA_DriverTypeDef; /* 参考自stm32_hal库 */

/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported variables --------------------------------------------------------*/
extern ADC_DMA_DriverTypeDef adc1_dma_driver;
extern ADC_DMA_DriverTypeDef adc3_dma_driver;


/* Exported functions ------------------------------------------------------- */
void ADC1_LP_Configuration(void);
void ADC1_Configuration(void *arg);

void ADC3_LP_Configuration(void);
void ADC3_Configuration(void *arg);


#endif/* __ADC_DRIVER_H */

/* END OF FILE ---------------------------------------------------------------*/
